package com.chatplus.application.domain.response;

import com.chatplus.application.common.enumeration.UserStatusEnum;
import com.chatplus.application.common.enumeration.UserTypeEnum;
import com.chatplus.application.json.Int64AsString;
import com.chatplus.application.json.PhoneJsonSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.io.Serializable;
import java.time.Instant;

/**
 * 账号登录相关响应信息
 */
public class AccountLoginResponse implements Serializable {
    private static final long serialVersionUID = 6429344185772985945L;
    /**
     * 账号Id
     */
    @JsonSerialize(using = Int64AsString.class)
    private Long id;
    /**
     * 手机号码
     */
    @JsonSerialize(using = PhoneJsonSerializer.class)
    private String mobile;
    /**
     * 头像
     */
    private String avatar;
    /**
     * 累计消耗 tokens
     */
    private Long totalTokens;
    /**
     * 当月消耗 tokens
     */
    private Long tokens;
    /**
     * 剩余调用次数
     */
    private Integer calls;
    /**
     * 剩余绘图次数
     */
    private Integer imgCalls;
    /**
     * 用户过期时间
     */
    private Integer expiredTime;
    /**
     * 当前状态
     */
    private UserStatusEnum status;
    /**
     * 聊天配置json
     */
    private String chatConfigJson;
    /**
     * 聊天角色 json
     */
    private String chatRolesJson;
    /**
     * AI模型 json
     */
    private String chatModelsJson;
    /**
     * 最后登录时间
     */
    private Instant lastLoginAt;
    /**
     * 是否会员
     */
    private Boolean vip;
    /**
     * 最后登录 IP
     */
    private String lastLoginIp;

    private String authorizationToken;

    private UserTypeEnum userType;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public Long getTotalTokens() {
        return totalTokens;
    }

    public void setTotalTokens(Long totalTokens) {
        this.totalTokens = totalTokens;
    }

    public Long getTokens() {
        return tokens;
    }

    public void setTokens(Long tokens) {
        this.tokens = tokens;
    }

    public Integer getCalls() {
        return calls;
    }

    public void setCalls(Integer calls) {
        this.calls = calls;
    }

    public Integer getImgCalls() {
        return imgCalls;
    }

    public void setImgCalls(Integer imgCalls) {
        this.imgCalls = imgCalls;
    }

    public Integer getExpiredTime() {
        return expiredTime;
    }

    public void setExpiredTime(Integer expiredTime) {
        this.expiredTime = expiredTime;
    }

    public UserStatusEnum getStatus() {
        return status;
    }

    public void setStatus(UserStatusEnum status) {
        this.status = status;
    }

    public String getChatConfigJson() {
        return chatConfigJson;
    }

    public void setChatConfigJson(String chatConfigJson) {
        this.chatConfigJson = chatConfigJson;
    }

    public String getChatRolesJson() {
        return chatRolesJson;
    }

    public void setChatRolesJson(String chatRolesJson) {
        this.chatRolesJson = chatRolesJson;
    }

    public String getChatModelsJson() {
        return chatModelsJson;
    }

    public void setChatModelsJson(String chatModelsJson) {
        this.chatModelsJson = chatModelsJson;
    }

    public Instant getLastLoginAt() {
        return lastLoginAt;
    }

    public void setLastLoginAt(Instant lastLoginAt) {
        this.lastLoginAt = lastLoginAt;
    }

    public Boolean getVip() {
        return vip;
    }

    public void setVip(Boolean vip) {
        this.vip = vip;
    }

    public String getLastLoginIp() {
        return lastLoginIp;
    }

    public void setLastLoginIp(String lastLoginIp) {
        this.lastLoginIp = lastLoginIp;
    }

    public String getAuthorizationToken() {
        return authorizationToken;
    }

    public void setAuthorizationToken(String authorizationToken) {
        this.authorizationToken = authorizationToken;
    }

    public UserTypeEnum getUserType() {
        return userType;
    }

    public void setUserType(UserTypeEnum userType) {
        this.userType = userType;
    }
}
